import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter) // VueRouter插件初始化

import home from '../work/home.vue'
//二级路由
import One from '../work/Son/One.vue'
import Two from '../work/Son/Two.vue'
import Three from '../work/Son/Three.vue'



const router = new VueRouter({
  // routes 路由规则们
  // route  一条路由规则 { path: 路径, component: 组件 }
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
      children: [
        {
          path: '/one',
          name: 'one',
          component: One
        },
        {
          path: '/two',
          name: 'two',
          component: Two
        },
        {
          path: '/three',
          name: 'three',
          component: Three
        },
      ]
    }
  ]
})
export default router